POV-Ray : Newsgroups : povray.general : an extraordinary rotation question : Re: an extraordinary rotation question Server Time
30 Jul 2024 14:26:13 EDT (-0400)
  Re: an extraordinary rotation question  
From: mysdn
Date: 24 Jun 2009 10:00:01
Message: <web.4a423009cfb6d60e4e47a1b0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:

> It might be easier to position your cabinets and slot them
> together if the back left corner of a cabinet was always in a consistent
> position.

What do you mean by a consistent position?

Wouldn't this position be <0,0,0> for each object then translated and rotated to
proper place within the Unions in the macro I'm trying to create.
Thank you for your input, it's making a big big difference with every post.

How can I incorporate a handle.inc in below Union?

#macro Cabinet
(Width,Height,Depth,HasDoor,Door_OpenAngle,Cabinet_Texture,Door_Texture)


  union {
    // Cabinet

    box {<0,0,0><Width,Height,Depth> pigment {image_map {jpeg
Cabinet_Texture}scale 0.5 } finish {phong 1 ambient 0.6 reflection 0}}



    // Door
    #if (HasDoor)
      box {<0,0,0><Width -1 ,Height -1,2> pigment {image_map {jpeg
Door_Texture}scale 0.5 }// finish {phong 1 ambient 0.6 reflection 0}}

        //texture {Door_Texture}
        rotate y*Door_OpenAngle
        translate z*60
      }
    #end

     //Handle
     /*
    #if (HasHandle)//INSTEAD OF box A HANDLE.INC (mesh) NEEDS TO BE DEFINED HERE
      box {<0,0,0><Width -1 ,Height -1,2> pigment {image_map {jpeg
Door_Texture}scale 1 } //finish {phong 1 ambient 0.6 reflection 0}}

        //texture {Door_Texture}
        rotate y*Door_OpenAngle
        translate z*60
      }
    #end
       */





  }

#end

PS: I'm thinking about opening a thread on macros, this has become an issue of
creating hundreds of macros for me.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.